import datetime
import json

# print(datetime.datetime.now())
#
# print(json.dumps(['1', 2, 3]))


d = {
    "咖啡": [10.0, 200],
    "iphone": [10.0, 200],
    "草莓": [10.0, 200],
    "洁厕王": [10.0, 200],
    "KFC全家桶": [10.0, 200],
    "键盘": [10.0, 200],
    "显示器": [10.0, 200],
    "苹果": [10.0, 200],
    "联想笔记本": [10.0, 200]
}

# for key in d:
#     print(key)

#
# def loop_input(msg, error_msg, func, *args):
#     while True:
#         data = input(msg).strip()
#         if func(data, *args):
#             return data
#         print(error_msg)
#
#
# res = loop_input(
#     '请输入要购买的商品编号',
#     '没有此商品，请重新输入！',
#     lambda x, list_len: 0 < int(x) < list_len if x.isdigit() else False,
#     10
# )
# print(res)

#
# for index, goods_name in enumerate(d):
#     print(index,' ',goods_name)

# print('123'.isdigit())
# print('-123'.isdigit())

# l = [1, 2, 3]
# for i in l:
#     if i == 3:
#         print(111)
# else:
#     print(int('-109'))


# def index(*args):
#     print(list(args))
#
#
# index(1, 2)

